package treeview.container.wrapped;

import document.Context;
import treemodel.Unit;
import treeview.container.HorizontalContainer;
import treeview.unit.IndentView;
import treeview.unit.ListMarkView;

import java.util.ArrayList;

/**
 * Created by Pavel Nikolaev
 */
public final class MarkedLineView extends IndentedLineView {
    private ListMarkView myMark;

    public MarkedLineView(ArrayList<Unit> units, int mark, Context context) {
        super(units, context);
        this.myMark = new ListMarkView(mark, context);
    }


    @Override
    protected HorizontalContainer createFirstSubLine() {
        HorizontalContainer line = new HorizontalContainer();
        line.add(myMark);
        return line;
    }

    @Override
    protected HorizontalContainer createSubLine() {
        HorizontalContainer line = new HorizontalContainer();
        line.add(new IndentView(myContext));
        return line;
    }
}
